<?php
require "../dao/dixingsetdao.php";
class dixingset{

	private $dixingset;//业务模型
	
	public function dixingset(){
		
		$dao=new dixingsetdao();		
		$this->dixingset=$dao->Chaxun();	
	}
	public function getdixing(){
		
		return $this->dixingset;
	}
}
$dixingset=new dixingset();
$dixinglist=$dixingset->getdixing();

//var_dump($vip->getvip());


?>
<table class="tab">
<tr>
    <td>ID</td>
	<td>障碍类型</td>
	<td>图片</td>
	<td>碰撞值</td>
	<td>修改图片</td>
	<td>修改碰撞值</td>
</tr>
<?php 
 foreach ($dixinglist as $gamer){ ?>
 <tr>
	<?php foreach ($gamer as $i=>$value){ ?>
	<td>
	<?php if ($i=='img'){
	if(strpos($value,"/")!=false){
	echo "<img src='../../qian/".$value."'/>";
	}else
	echo "<img src='../view/img.php?src=".$value."'/>";
   }
   else {echo $value; }?>
   	</td>
	<?php }?>
<form  action="../controller/handout.php?con=dixingset&action=crush&crushid=<?php echo $gamer['id'] ?>" enctype="multipart/form-data" method="post">	
<td>
<input type="file" name="file"  value="上传图片"/>
</td>
<td><input type="text" name="crushval" />
<input type="submit"  value="修改"/></td>
</form>
</tr> 
 <?php }?>
</table>









